<%@ page pageEncoding="UTF-8"%>
<%@page import="java.util.ArrayList"%>
<%@page import="com.base.DatabaseObject"%>
<%@page import="com.base.DatabaseDAO"%>
<%@page import="com.base.Config"%>
<%@page import="java.math.BigDecimal"%>
<%@page import="com.utils.LOBs"%>
<%@page import="java.sql.Clob"%>

<%@include file="inc-header.jsp"%><!-- MAIN CONTENT -->
<div class="box bottom10">
	<%@include file="inc-nav-header.jsp"%>
	<%
	String sCatId = Utils.getParam(request, "catid", "0");
	String sId = Utils.getParam(request, "id", "0");
	String sPage = Utils.getParam(request, "page", "1");
	DatabaseObject gameCategory = contentDAO.getCategory(new BigDecimal(sCatId));
	DatabaseObject gameContent = contentDAO.getContent(new BigDecimal(sId));

	%>
	<div class="tab2">
		<%@include file="dichvu-adv.jsp" %> >>
		<a href="news.jsp?act=dv"> Tin tức </a> >>
		<a href="news.jsp?act=dv&catid=<%=gameCategory.getAttribute().get("ID") %>" class="active"> <%=gameCategory.getAttribute().get("NAME") %></a>
	</div>
	<!--end .tab2-->
	<!-- BODY CONTENT -->
	<div class="box clearfix">

		<div class="table">
			<table cellpadding="0" cellspacing="0" border="0" width="100%">
				<tbody>
				<tr>
						<td width="4%"><a href="#"> <img src="<%=imagePath + gameContent.getAttribute().get("preview_image") %>" alt="<%=gameContent.getAttribute().get("name") %>" class="img-158-158"></a></td>
		                <td width="96%" class="text-left">
		                    <h2 class="clearfix"><a href="#" class="f1"> <strong> <%=gameContent.getAttribute().get("name") %> </strong></a></h2>
		                </td>
		            </tr>
		        </tbody>
		    </table>
		</div><!--end .table-->

		<div class="box-cont">
		    <h3> <b> Giới thiệu: </b></h3> 
		    <p class="MsoNormal" style="text-align: justify; line-height: normal;">
		        <span style="font-size: 10pt; font-family: Arial,sans-serif">
		            <%=gameContent.getAttribute().get("detail") == null?"":LOBs.readClob((Clob)gameContent.getAttribute().get("detail")).replaceAll("\n", "<br/>")%>
		        </span>
		    </p>  
		</div><!--end .box-cont-->
	</div>
	<div class="box clearfix">
		<div class="title padbot5px">
			<h3>
				<img src="icon_news.png" width="23" height="23" alt="" aign="left"> <strong> Danh mục tin tức</strong>
			</h3>
		</div>
		<!--end .title-->
		<ul class="list-dot"><%
		String catGameParentId = Config.getStringProperty("CAT_NEWS_PARENT_ID", "1787", false);
		if (!StringTool.isEmptyOrNul(catGameParentId)) {
			ArrayList<DatabaseObject> gameCategoryList = contentDAO.getCategory(catGameParentId, null);
			for (DatabaseObject game : gameCategoryList) {%>
			<li>
				<img src="images/icon-list.png" alt="<%=game.getAttribute().get("NAME") %>">
				<a href="news.jsp?act=dv&catid=<%=game.getAttribute().get("ID") %>"> <%=game.getAttribute().get("NAME") %> </a>
			</li>
		<%}}%>
		</ul>
	</div>
	<!-- END BODY CONTENT -->
</div>
<!--end .box bottom10-->
<%@include file="inc-nav-bottom.jsp"%>
<!-- END MAIN CONTENT -->
<%@include file="inc-footter.jsp"%>
